package com.todo.biz.application.service;


import com.todo.common.common.entity.request.PageRequest;
import com.todo.common.common.entity.response.page.PageResult;
import com.todo.common.common.enums.BusinessSceneEnum;
import com.todo.biz.common.enums.AssociateRelationTypeEnum;
import com.todo.biz.application.entity.bo.BizAssociateBO;

import java.util.List;

/**
 * (BizAssociate)表服务接口
 *
 * @author zhangwenxiang
 * @since 2024-03-04 00:19:41
 */
public interface BizAssociateService {

    /**
     * 新增业务关联
     *
     * @param bizAssociateBO
     * @return
     */
    Boolean insertBizAssociate(BizAssociateBO bizAssociateBO);

    /**
     * 根据主键删除业务关联
     *
     * @param id
     * @return
     */
    Boolean removeBizAssociateById(Long userId, Long id);

    /**
     * 根据主键查询业务关联
     *
     * @param id
     * @return
     */
    BizAssociateBO queryBizAssociateById(Long id);

    /**
     * 根据用户下业务id和场景查询业务关联
     *
     * @param userId
     * @param bizId
     * @param scene
     * @return
     */
    List<BizAssociateBO> queryBizAssociateByBizIdAndScene(Long userId, Long bizId, BusinessSceneEnum scene);

    /**
     * 分页查询用户业务关联列表
     *
     * @param userId
     * @param scene
     * @param relationType
     * @param pageRequest
     * @return
     */
    PageResult<BizAssociateBO> queryBizAssociateByPage(Long userId, BusinessSceneEnum scene, AssociateRelationTypeEnum relationType, PageRequest pageRequest);

    /**
     * 删除关联列表
     *
     * @param userId
     * @param idList
     * @return
     */
    Boolean removeBizAssociateByIdList(Long userId, List<Long> idList);
}
